/* 导航经过 */
function navIn(e) {
  $(e).find('.nbcul-children').slideDown()
}
/* 导航离开 */
function navOut() {
  $('.nbcul-children').hide()
}
// 新闻中心搜索框
let searchValue = ''
function searchInput(e) {
  let val = $(e).val()
  searchValue = `?keyword=${val}`
}
// 新闻中心搜索
function searchSub() {
  let pathname = location.pathname ? /^\/(.*?)\//.exec(location.pathname)[0] : ''
  let search = location.search ? location.search.split('?keyword=')[0] : ''
  if (searchValue == '' && search != '') {
    searchValue = location.search.split('?keyword=')[1]
  }
  if (searchValue == '' && search == '') {
    alert('请输入关键词')
    return false
  }
  location.href = pathname + searchValue
}